package com.takeaway.controller;


import com.takeaway.pojo.ResultVO;
import com.takeaway.pojo.UserInfo;
import com.takeaway.utils.ResultVOUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
@Api(value = "用户操作",tags = "用户操作接口，比如登录，注册等")
public class UserController {

    @RequestMapping(value = "/login",method = RequestMethod.GET)
    @ApiOperation(value="该方法是后台管理的登录入口")
    public ResultVO<String> login(@ApiParam("用户名")String name, @ApiParam("密码")String password){

        System.out.println(name+","+password);
        UserInfo user = new UserInfo();
        user.setName("zhangsan");
        user.setPassword("123456");

   

        return ResultVOUtil.success(user);

    }

}
